%% Copyright 2003 Paul Pichaureau for the MathDesign Project
%% All rights reserved.
%%
%% This file is part of the mdbch package v1.55
%% --------------------------------------------------
%%
%% This program is free software; you can redistribute it and/or
%% modify it under the terms of the GNU General Public License
%% as published by the Free Software Foundation; either version 2
%% of the License, or (at your option) any later version.

%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%% GNU General Public License for more details.

%% You should have received a copy of the GNU General Public License
%% along with this program; if not, write to the Free Software
%% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
%% Public LaTeX Project Public

%% This file loads the mdbch font families.

%% For more information about options and configuration, please read
%% mdbchdoc.pdf or the general MathDesign documentation mddoc.pdf.

\NeedsTeXFormat{LaTeX2e}%

\ProvidesPackage{mdbch}%
[2006/01/29 v1.55 bitstream charter + mdbch (Math Design Project)]

\@ifundefined{@MDfont}{
    \PackageError{mdbch}%
    {Package mdbch cannot be loaded directly. Use mathdesign package.}
    {Use mathdesign package with option mdbch.}}
{}


%% ----------------------------------------------------------------
%% Common fonts can be scaled according to the following parameters (to
%% ensure correct lining of the glyphs)
%% ----------------------------------------------------------------

%% Bera (alias Bistream Vera)
\def\fvm@ratio{0.846}%
\def\fvs@ratio{0.846}%
\def\fve@ratio{0.846}%

%% Typewriter fonts
\def\pcr@ratio{1.086}%
\def\ucr@ratio{1.110}%

%% Sans Serif font
\def\phv@ratio{0.885}%
\def\uag@ratio{0.846}%
\def\uhv@ratio{0.883}%

%% Computer Modern fonts
\def\cmsy@ratio{0.945}%
\def\cmtt@ratio{1.075}%
\def\cmss@ratio{1.041}%

%% Euler fraktur
\def\euf@ratio{0.969}%

%% AMS blackboard bold
\def\msb@ratio{0.945}%

\input{mdfont.def}

\if@MDsfscaled 
  \input{mdsffont.def}
\fi

\if@MDttscaled 
  \input{mdttfont.def}
\fi

%% ----------------------------------------------------------------
%% Script Math Alphabet
%% ----------------------------------------------------------------

\WarningIfLoaded{mdbch}{mathrsfs}%

\if@MDcmcal
\DeclareSymbolFont{mdcal}{OMS}{xmdcmsy}{m}{n}%
\else
\DeclareSymbolFont{mdcal}{OMS}{mdbch}{m}{n}%
\SetSymbolFont{mdcal}{bold}{OMS}{mdbch}{b}{n}%
\fi
\DeclareSymbolFontAlphabet{\mathcal}{mdcal}
\DeclareSymbolFont{mdscr}{OMS}{mdbch}{m}{n}%

\DeclareSymbolFontAlphabet{\mathscr}{mdscr}%
\SetSymbolFont{mdscr}{bold}{OMS}{mdbch}{b}{n}%

%% ----------------------------------------------------------------
%% Fraktur symbols support
%% ----------------------------------------------------------------

\DeclareMathAlphabet{\mathfrak}{U}{xmdeuf}{m}{n}%
\SetMathAlphabet{\mathfrak}{bold}{U}{xmdeuf}{b}{n}%
\DeclareRobustCommand{\frak}[1]{%
    {\@subst@obsolete{mdbch}\frak\mathfrak{#1}}}%

%% -------------------------------------------------------------------
%% Mathematical fonts definition
%% -------------------------------------------------------------------


    \renewcommand{\rmdefault}{mdbch}\rmfamily

    \def\MDnormal{mdbch}%
    \SetSymbolFont{operators}   {normal}{OT1}{mdbch}{m}{n}%
    \SetSymbolFont{letters}     {normal}{OML}{mdbch}{m}{it}%
    \SetSymbolFont{symbols}     {normal}{OMS}{mdbch}{m}{n}%
    \SetSymbolFont{largesymbols}{normal}{OMX}{mdbch}{m}{n}%

    \SetSymbolFont{operators}   {bold}{OT1}{mdbch}{b}{n}%
    \SetSymbolFont{letters}     {bold}{OML}{mdbch}{b}{it}%
    \SetSymbolFont{symbols}     {bold}{OMS}{mdbch}{b}{n}%
    \SetSymbolFont{largesymbols}{bold}{OMX}{mdbch}{b}{n}%
    
    \SetMathAlphabet{\mathrm}{normal}{\encodingdefault}{\rmdefault}{m}{n}%
    \SetMathAlphabet{\mathbf}{normal}{\encodingdefault}{\rmdefault}{b}{n}%
    \SetMathAlphabet{\mathit}{normal}{\encodingdefault}{\rmdefault}{m}{it}%
    \SetMathAlphabet{\mathsf}{normal}{\encodingdefault}{\sfdefault}{m}{n}%
    \SetMathAlphabet{\mathtt}{normal}{\encodingdefault}{\ttdefault}{m}{n}%
    \if@MDcmcal
    \SetMathAlphabet{\mathcal}{normal}{OMS}{xmdcmsy}{m}{n}%
    \else
    \SetMathAlphabet{\mathcal}{normal}{OMS}{mdbch}{m}{n}%
    \fi

    \DeclareSymbolFontAlphabet{\mathscr}{mdscr}%

    \SetMathAlphabet{\mathrm}{bold} {\encodingdefault}{\rmdefault}{b}{n}%
    \SetMathAlphabet{\mathbf}{bold} {\encodingdefault}{\rmdefault}{b}{n}%
    \SetMathAlphabet{\mathit}{bold} {\encodingdefault}{\rmdefault}{b}{it}%
    \SetMathAlphabet{\mathsf}{bold} {\encodingdefault}{\sfdefault}{b}{n}%
    \SetMathAlphabet{\mathtt}{bold} {\encodingdefault}{\ttdefault}{b}{n}%

%% %% -------------------------------------------------------------------
%% %% The name of the bold series
%% %% -------------------------------------------------------------------

%% \renewcommand\bfdefault{b}

%% -------------------------------------------------------------------
%% Wide accents
%% -------------------------------------------------------------------

\DeclareMathAccent{\widetilde}{\mathord}{largesymbols}{"65}
\DeclareMathAccent{\widehat}{\mathord}{largesymbols}{"62}
\DeclareMathAccent{\widetriangle}{\mathord}{largesymbols}{"E6}
\DeclareMathAccent{\wideparen}{\mathord}{largesymbols}{"F3}
\ifx\overset\@undefined\else
\newcommand{\widering}[1]{\overset{\smash{\vbox to .2ex{%
                \hbox{$\mathring{}$}}}}{\wideparen{#1}}}
\fi


%% -------------------------------------------------------------------
%% Double left and right bracket
%% -------------------------------------------------------------------

\MD@def\DeclareMathDelimiter{\llbracket}{\mathopen} {largesymbols}{"B9}{largesymbols}{"83}
\MD@def\DeclareMathDelimiter{\rrbracket}{\mathclose}{largesymbols}{"BA}{largesymbols}{"8D}

%% -------------------------------------------------------------------
%% Wavy vertical lines
%% -------------------------------------------------------------------

\MD@def\DeclareMathDelimiter{\lwave}{\mathopen} {largesymbols}{"D0}{largesymbols}{"D0}
\MD@def\DeclareMathDelimiter{\rwave}{\mathclose}{largesymbols}{"D0}{largesymbols}{"D0}

\MD@def\DeclareMathDelimiter{\levaw}{\mathopen} {largesymbols}{"D1}{largesymbols}{"D1}
\MD@def\DeclareMathDelimiter{\revaw}{\mathclose}{largesymbols}{"D1}{largesymbols}{"D1}

\def\leftwave{\left\lwave}
\def\rightwave{\right\rwave}
\def\leftevaw{\left\levaw}
\def\rightevaw{\right\revaw}

%% ----------------------------------------------------------------
%% Uppercase upright
%% ----------------------------------------------------------------

\DeclareSymbolFont{lettersupright}     {OML}{mdbch}{m}{n}
\SetSymbolFont{lettersupright}   {bold}{OML}{mdbch}{b}{n}%
                                %\DeclareSymbolFont{lettersslanted}     {OML}{mdbch}{m}{it}

\DeclareSymbolFontAlphabet{\mathrm}    {lettersupright}

\if@MDcapupright
\DeclareMathSymbol{A}{\mathalpha}{lettersupright}{`A}
\DeclareMathSymbol{B}{\mathalpha}{lettersupright}{`B}
\DeclareMathSymbol{C}{\mathalpha}{lettersupright}{`C}
\DeclareMathSymbol{D}{\mathalpha}{lettersupright}{`D}
\DeclareMathSymbol{E}{\mathalpha}{lettersupright}{`E}
\DeclareMathSymbol{F}{\mathalpha}{lettersupright}{`F}
\DeclareMathSymbol{G}{\mathalpha}{lettersupright}{`G}
\DeclareMathSymbol{H}{\mathalpha}{lettersupright}{`H}
\DeclareMathSymbol{I}{\mathalpha}{lettersupright}{`I}
\DeclareMathSymbol{J}{\mathalpha}{lettersupright}{`J}
\DeclareMathSymbol{K}{\mathalpha}{lettersupright}{`K}
\DeclareMathSymbol{L}{\mathalpha}{lettersupright}{`L}
\DeclareMathSymbol{M}{\mathalpha}{lettersupright}{`M}
\DeclareMathSymbol{N}{\mathalpha}{lettersupright}{`N}
\DeclareMathSymbol{O}{\mathalpha}{lettersupright}{`O}
\DeclareMathSymbol{P}{\mathalpha}{lettersupright}{`P}
\DeclareMathSymbol{Q}{\mathalpha}{lettersupright}{`Q}
\DeclareMathSymbol{R}{\mathalpha}{lettersupright}{`R}
\DeclareMathSymbol{S}{\mathalpha}{lettersupright}{`S}
\DeclareMathSymbol{T}{\mathalpha}{lettersupright}{`T}
\DeclareMathSymbol{U}{\mathalpha}{lettersupright}{`U}
\DeclareMathSymbol{V}{\mathalpha}{lettersupright}{`V}
\DeclareMathSymbol{W}{\mathalpha}{lettersupright}{`W}
\DeclareMathSymbol{X}{\mathalpha}{lettersupright}{`X}
\DeclareMathSymbol{Y}{\mathalpha}{lettersupright}{`Y}
\DeclareMathSymbol{Z}{\mathalpha}{lettersupright}{`Z}
\fi

%% ----------------------------------------------------------------
%% Lowercase greek upright
%% ----------------------------------------------------------------

\if@MDgrupright %
\MD@def\DeclareMathSymbol{\alpha}{\mathord}{lettersupright}{"0B}
\MD@def\DeclareMathSymbol{\beta}{\mathord}{lettersupright}{"0C}
\MD@def\DeclareMathSymbol{\gamma}{\mathord}{lettersupright}{"0D}
\MD@def\DeclareMathSymbol{\delta}{\mathord}{lettersupright}{"0E}
\MD@def\DeclareMathSymbol{\epsilon}{\mathord}{lettersupright}{"0F}
\MD@def\DeclareMathSymbol{\zeta}{\mathord}{lettersupright}{"10}
\MD@def\DeclareMathSymbol{\eta}{\mathord}{lettersupright}{"11}
\MD@def\DeclareMathSymbol{\theta}{\mathord}{lettersupright}{"12}
\MD@def\DeclareMathSymbol{\iota}{\mathord}{lettersupright}{"13}
\MD@def\DeclareMathSymbol{\kappa}{\mathord}{lettersupright}{"14}
\MD@def\DeclareMathSymbol{\lambda}{\mathord}{lettersupright}{"15}
\MD@def\DeclareMathSymbol{\mu}{\mathord}{lettersupright}{"16}
\MD@def\DeclareMathSymbol{\nu}{\mathord}{lettersupright}{"17}
\MD@def\DeclareMathSymbol{\xi}{\mathord}{lettersupright}{"18}
\MD@def\DeclareMathSymbol{\pi}{\mathord}{lettersupright}{"19}
\MD@def\DeclareMathSymbol{\rho}{\mathord}{lettersupright}{"1A}
\MD@def\DeclareMathSymbol{\sigma}{\mathord}{lettersupright}{"1B}
\MD@def\DeclareMathSymbol{\tau}{\mathord}{lettersupright}{"1C}
\MD@def\DeclareMathSymbol{\upsilon}{\mathord}{lettersupright}{"1D}
\MD@def\DeclareMathSymbol{\phi}{\mathord}{lettersupright}{"1E}
\MD@def\DeclareMathSymbol{\chi}{\mathord}{lettersupright}{"1F}
\MD@def\DeclareMathSymbol{\psi}{\mathord}{lettersupright}{"20}
\MD@def\DeclareMathSymbol{\omega}{\mathord}{lettersupright}{"21}
\MD@def\DeclareMathSymbol{\varepsilon}{\mathord}{lettersupright}{"22}
\MD@def\DeclareMathSymbol{\vartheta}{\mathord}{lettersupright}{"23}
\MD@def\DeclareMathSymbol{\varpi}{\mathord}{lettersupright}{"24}
\MD@def\DeclareMathSymbol{\varrho}{\mathord}{lettersupright}{"25}
\MD@def\DeclareMathSymbol{\varsigma}{\mathord}{lettersupright}{"26}
\MD@def\DeclareMathSymbol{\varphi}{\mathord}{lettersupright}{"27}
\fi

%% ----------------------------------------------------------------
%% Uppercase greek slanted
%% ----------------------------------------------------------------

\if@MDGRupright %
\else
\MD@def\DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00}
\MD@def\DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01}
\MD@def\DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02}
\MD@def\DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03}
\MD@def\DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04}
\MD@def\DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05}
\MD@def\DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06}
\MD@def\DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07}
\MD@def\DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08}
\MD@def\DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09}
\MD@def\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}
\fi

 %% upright greek letters are avalaible vi \alphaup like macros
\MD@def\DeclareMathSymbol{\alphaup}{\mathord}{lettersupright}{"0B}
\MD@def\DeclareMathSymbol{\betaup}{\mathord}{lettersupright}{"0C}
\MD@def\DeclareMathSymbol{\gammaup}{\mathord}{lettersupright}{"0D}
\MD@def\DeclareMathSymbol{\deltaup}{\mathord}{lettersupright}{"0E}
\MD@def\DeclareMathSymbol{\epsilonup}{\mathord}{lettersupright}{"0F}
\MD@def\DeclareMathSymbol{\zetaup}{\mathord}{lettersupright}{"10}
\MD@def\DeclareMathSymbol{\etaup}{\mathord}{lettersupright}{"11}
\MD@def\DeclareMathSymbol{\thetaup}{\mathord}{lettersupright}{"12}
\MD@def\DeclareMathSymbol{\iotaup}{\mathord}{lettersupright}{"13}
\MD@def\DeclareMathSymbol{\kappaup}{\mathord}{lettersupright}{"14}
\MD@def\DeclareMathSymbol{\lambdaup}{\mathord}{lettersupright}{"15}
\MD@def\DeclareMathSymbol{\muup}{\mathord}{lettersupright}{"16}
\MD@def\DeclareMathSymbol{\nuup}{\mathord}{lettersupright}{"17}
\MD@def\DeclareMathSymbol{\xiup}{\mathord}{lettersupright}{"18}
\MD@def\DeclareMathSymbol{\piup}{\mathord}{lettersupright}{"19}
\MD@def\DeclareMathSymbol{\rhoup}{\mathord}{lettersupright}{"1A}
\MD@def\DeclareMathSymbol{\sigmaup}{\mathord}{lettersupright}{"1B}
\MD@def\DeclareMathSymbol{\tauup}{\mathord}{lettersupright}{"1C}
\MD@def\DeclareMathSymbol{\upsilonup}{\mathord}{lettersupright}{"1D}
\MD@def\DeclareMathSymbol{\phiup}{\mathord}{lettersupright}{"1E}
\MD@def\DeclareMathSymbol{\chiup}{\mathord}{lettersupright}{"1F}
\MD@def\DeclareMathSymbol{\psiup}{\mathord}{lettersupright}{"20}
\MD@def\DeclareMathSymbol{\omegaup}{\mathord}{lettersupright}{"21}
\MD@def\DeclareMathSymbol{\varepsilonup}{\mathord}{lettersupright}{"22}
\MD@def\DeclareMathSymbol{\varthetaup}{\mathord}{lettersupright}{"23}
\MD@def\DeclareMathSymbol{\varpiup}{\mathord}{lettersupright}{"24}
\MD@def\DeclareMathSymbol{\varrhoup}{\mathord}{lettersupright}{"25}
\MD@def\DeclareMathSymbol{\varsigmaup}{\mathord}{lettersupright}{"26}
\MD@def\DeclareMathSymbol{\varphiup}{\mathord}{lettersupright}{"27}
\MD@def\DeclareMathSymbol{\Gammaup}{\mathalpha}{lettersupright}{"00}
\MD@def\DeclareMathSymbol{\Deltaup}{\mathalpha}{lettersupright}{"01}
\MD@def\DeclareMathSymbol{\Thetaup}{\mathalpha}{lettersupright}{"02}
\MD@def\DeclareMathSymbol{\Lambdaup}{\mathalpha}{lettersupright}{"03}
\MD@def\DeclareMathSymbol{\Xiup}{\mathalpha}{lettersupright}{"04}
\MD@def\DeclareMathSymbol{\Piup}{\mathalpha}{lettersupright}{"05}
\MD@def\DeclareMathSymbol{\Sigmaup}{\mathalpha}{lettersupright}{"06}
\MD@def\DeclareMathSymbol{\Upsilonup}{\mathalpha}{lettersupright}{"07}
\MD@def\DeclareMathSymbol{\Phiup}{\mathalpha}{lettersupright}{"08}
\MD@def\DeclareMathSymbol{\Psiup}{\mathalpha}{lettersupright}{"09}
\MD@def\DeclareMathSymbol{\Omegaup}{\mathalpha}{lettersupright}{"0A}

\MD@def\DeclareMathSymbol{\alphait}{\mathord}{letters}{"0B}
\MD@def\DeclareMathSymbol{\betait}{\mathord}{letters}{"0C}
\MD@def\DeclareMathSymbol{\gammait}{\mathord}{letters}{"0D}
\MD@def\DeclareMathSymbol{\deltait}{\mathord}{letters}{"0E}
\MD@def\DeclareMathSymbol{\epsilonit}{\mathord}{letters}{"0F}
\MD@def\DeclareMathSymbol{\zetait}{\mathord}{letters}{"10}
\MD@def\DeclareMathSymbol{\etait}{\mathord}{letters}{"11}
\MD@def\DeclareMathSymbol{\thetait}{\mathord}{letters}{"12}
\MD@def\DeclareMathSymbol{\iotait}{\mathord}{letters}{"13}
\MD@def\DeclareMathSymbol{\kappait}{\mathord}{letters}{"14}
\MD@def\DeclareMathSymbol{\lambdait}{\mathord}{letters}{"15}
\MD@def\DeclareMathSymbol{\muit}{\mathord}{letters}{"16}
\MD@def\DeclareMathSymbol{\nuit}{\mathord}{letters}{"17}
\MD@def\DeclareMathSymbol{\xiit}{\mathord}{letters}{"18}
\MD@def\DeclareMathSymbol{\piit}{\mathord}{letters}{"19}
\MD@def\DeclareMathSymbol{\rhoit}{\mathord}{letters}{"1A}
\MD@def\DeclareMathSymbol{\sigmait}{\mathord}{letters}{"1B}
\MD@def\DeclareMathSymbol{\tauit}{\mathord}{letters}{"1C}
\MD@def\DeclareMathSymbol{\upsilonit}{\mathord}{letters}{"1D}
\MD@def\DeclareMathSymbol{\phiit}{\mathord}{letters}{"1E}
\MD@def\DeclareMathSymbol{\chiit}{\mathord}{letters}{"1F}
\MD@def\DeclareMathSymbol{\psiit}{\mathord}{letters}{"20}
\MD@def\DeclareMathSymbol{\omegait}{\mathord}{letters}{"21}
\MD@def\DeclareMathSymbol{\varepsilonit}{\mathord}{letters}{"22}
\MD@def\DeclareMathSymbol{\varthetait}{\mathord}{letters}{"23}
\MD@def\DeclareMathSymbol{\varpiit}{\mathord}{letters}{"24}
\MD@def\DeclareMathSymbol{\varrhoit}{\mathord}{letters}{"25}
\MD@def\DeclareMathSymbol{\varsigmait}{\mathord}{letters}{"26}
\MD@def\DeclareMathSymbol{\varphiit}{\mathord}{letters}{"27}
\MD@def\DeclareMathSymbol{\Gammait}{\mathalpha}{letters}{"00}
\MD@def\DeclareMathSymbol{\Deltait}{\mathalpha}{letters}{"01}
\MD@def\DeclareMathSymbol{\Thetait}{\mathalpha}{letters}{"02}
\MD@def\DeclareMathSymbol{\Lambdait}{\mathalpha}{letters}{"03}
\MD@def\DeclareMathSymbol{\Xiit}{\mathalpha}{letters}{"04}
\MD@def\DeclareMathSymbol{\Piit}{\mathalpha}{letters}{"05}
\MD@def\DeclareMathSymbol{\Sigmait}{\mathalpha}{letters}{"06}
\MD@def\DeclareMathSymbol{\Upsilonit}{\mathalpha}{letters}{"07}
\MD@def\DeclareMathSymbol{\Phiit}{\mathalpha}{letters}{"08}
\MD@def\DeclareMathSymbol{\Psiit}{\mathalpha}{letters}{"09}
\MD@def\DeclareMathSymbol{\Omegait}{\mathalpha}{letters}{"0A}

%% ----------------------------------------------------------------
%% Additional symbols
%% ----------------------------------------------------------------

\def\iddots{\mathinner{\mkern1mu\raise1\p@
        \vbox{\kern7\p@\hbox{.}}\mkern2mu
        \raise4\p@\hbox{.}\mkern2mu\raise7\p@\hbox{.}\mkern1mu}}


%% ----------------------------------------------------------------
%% Additional fonts
%% ----------------------------------------------------------------

%% AMS fonts
\WarningIfLoaded{mdbch}{amssymb}
\WarningIfLoaded{mdbch}{amsfonts}
\DeclareFontEncoding{MDA}{}{}
\DeclareFontSubstitution{MDA}{cmr}{m}{n}
\DeclareSymbolFont{mathdesignA}{MDA}{mdbch}{m}{n}%
%% \DeclareSymbolFont{mathdesignAI}{MDA}{mdbch}{m}{it}%
\SetSymbolFont{mathdesignA}   {bold}{MDA}{mdbch}{b}{n}%
%% \SetSymbolFont{mathdesignAI}  {bold}{MDA}{mdbch}{b}{it}%
%% \DeclareSymbolFont{AMSbmdbch}{U}{msbmdbch}{m}{n}
%% \DeclareSymbolFontAlphabet{\mdmathbb}{AMSbmdbch} 
\DeclareSymbolFontAlphabet{\mdmathbb}{mathdesignA} 
\DeclareFontEncodingDefaults{\relax}{\def\accentclass@{7}}

                                % The following code borrowed from amsfonts.sty and amsbsy.sty

\long\def\@gobblethree#1#2#3{}
\def\@subst@obsolete#1#2#3{\@obsolete{#1}#2#3\gdef#2{#3}#2}
\if@compatibility
\let\@obsolete\@gobblethree
\else
\def\@obsolete#1#2#3{\PackageWarning{#1}{%
        Obsolete command \protect#2; \protect#3 should be used instead}}%
\fi
\DeclareRobustCommand{\bold}[1]{%
    {\@subst@obsolete{amsfonts}\bold\mathbf{#1}}}

\providecommand*{\@mathmeasure}[3]{%
    \setbox#1\hbox{\frozen@everymath\@emptytoks\m@th$#2#3$}}

\@ifundefined{@emptytoks}{\csname newtoks\endcsname\@emptytoks}{}
    \let\mathbb\@undefined
    \global\let\mathbb\mdmathbb
    \MD@def\DeclareRobustCommand{\Bbb}[1]{%
        {\@subst@obsolete{mdbch}\Bbb\mathbb{#1}}}
    
    \xdef\yen{\noexpand\mathhexbox{\hexnumber@\symmathdesignA}D5}
    \xdef\checkmark{\noexpand\mathhexbox{\hexnumber@\symmathdesignA}D8}
    \xdef\circledR{\noexpand\mathhexbox{\hexnumber@\symmathdesignA}F2}
    \def\circledS{\textcircled{S}}
    \xdef\maltese{\noexpand\mathhexbox{\hexnumber@\symmathdesignA}FA}
    \catcode`\"=12
    \MD@def\DeclareMathDelimiter{\ulcorner}{\mathopen} {mathdesignA}{"F0}{mathdesignA}{"F0}
    \MD@def\DeclareMathDelimiter{\urcorner}{\mathclose}{mathdesignA}{"F1}{mathdesignA}{"F1}
    \MD@def\DeclareMathDelimiter{\llcorner}{\mathopen} {mathdesignA}{"F8}{mathdesignA}{"F8}
    \MD@def\DeclareMathDelimiter{\lrcorner}{\mathclose}{mathdesignA}{"F9}{mathdesignA}{"F9}
    \DeclareMathAccent{\widetilde}{\mathord}{largesymbols}{"65}
    \DeclareMathAccent{\widehat}{\mathord}{largesymbols}{"62}
    \MD@def\DeclareMathSymbol{\dabar@}{\mathord}{mathdesignA}{"B9}
    
\xdef\dashrightarrow{\mathrel{\dabar@\dabar@
            \mathchar"0\hexnumber@\symmathdesignA CB}}%
    \xdef\dashleftarrow{\mathrel{\mathchar"0\hexnumber@\symmathdesignA CC\dabar@\dabar@}}%
    \global\let\dasharrow\dashrightarrow
    
%%   Begin AMSb declarations
    \MD@def\DeclareMathSymbol{\lvertneqq}    {\mathrel}{mathdesignA}{"00}
    \MD@def\DeclareMathSymbol{\gvertneqq}    {\mathrel}{mathdesignA}{"01}
    \MD@def\DeclareMathSymbol{\nleq}         {\mathrel}{mathdesignA}{"02}
    \MD@def\DeclareMathSymbol{\ngeq}         {\mathrel}{mathdesignA}{"03}
    \MD@def\DeclareMathSymbol{\nless}        {\mathrel}{mathdesignA}{"04}
    \MD@def\DeclareMathSymbol{\ngtr}         {\mathrel}{mathdesignA}{"05}
    \MD@def\DeclareMathSymbol{\nprec}        {\mathrel}{mathdesignA}{"06}
    \MD@def\DeclareMathSymbol{\nsucc}        {\mathrel}{mathdesignA}{"07}
    \MD@def\DeclareMathSymbol{\lneqq}        {\mathrel}{mathdesignA}{"08}
    \MD@def\DeclareMathSymbol{\gneqq}        {\mathrel}{mathdesignA}{"09}
    \MD@def\DeclareMathSymbol{\nleqslant}    {\mathrel}{mathdesignA}{"0A}
    \MD@def\DeclareMathSymbol{\ngeqslant}    {\mathrel}{mathdesignA}{"0B}
    \MD@def\DeclareMathSymbol{\lneq}         {\mathrel}{mathdesignA}{"0C}
    \MD@def\DeclareMathSymbol{\gneq}         {\mathrel}{mathdesignA}{"0D}
    \MD@def\DeclareMathSymbol{\npreceq}      {\mathrel}{mathdesignA}{"0E}
    \MD@def\DeclareMathSymbol{\nsucceq}      {\mathrel}{mathdesignA}{"0F}
    \MD@def\DeclareMathSymbol{\precnsim}     {\mathrel}{mathdesignA}{"10}
    \MD@def\DeclareMathSymbol{\succnsim}     {\mathrel}{mathdesignA}{"11}
    \MD@def\DeclareMathSymbol{\lnsim}        {\mathrel}{mathdesignA}{"12}
    \MD@def\DeclareMathSymbol{\gnsim}        {\mathrel}{mathdesignA}{"13}
    \MD@def\DeclareMathSymbol{\nleqq}        {\mathrel}{mathdesignA}{"14}
    \MD@def\DeclareMathSymbol{\ngeqq}        {\mathrel}{mathdesignA}{"15}
    \MD@def\DeclareMathSymbol{\precneqq}     {\mathrel}{mathdesignA}{"16}
    \MD@def\DeclareMathSymbol{\succneqq}     {\mathrel}{mathdesignA}{"17}
    \MD@def\DeclareMathSymbol{\precnapprox}  {\mathrel}{mathdesignA}{"18}
    \MD@def\DeclareMathSymbol{\succnapprox}  {\mathrel}{mathdesignA}{"19}
    \MD@def\DeclareMathSymbol{\lnapprox}     {\mathrel}{mathdesignA}{"1A}
    \MD@def\DeclareMathSymbol{\gnapprox}     {\mathrel}{mathdesignA}{"1B}
    \MD@def\DeclareMathSymbol{\nsim}         {\mathrel}{mathdesignA}{"1C}
    \MD@def\DeclareMathSymbol{\ncong}        {\mathrel}{mathdesignA}{"1D}
    \MD@def\DeclareMathSymbol{\diagup}       {\mathord}{mathdesignA}{"1E}
    \MD@def\DeclareMathSymbol{\diagdown}     {\mathord}{mathdesignA}{"1F}
    \MD@def\DeclareMathSymbol{\varsubsetneq}   {\mathrel}{mathdesignA}{"20}
    \MD@def\DeclareMathSymbol{\varsupsetneq}   {\mathrel}{mathdesignA}{"21}
    \MD@def\DeclareMathSymbol{\nsubseteqq}     {\mathrel}{mathdesignA}{"22}
    \MD@def\DeclareMathSymbol{\nsupseteqq}     {\mathrel}{mathdesignA}{"23}
    \MD@def\DeclareMathSymbol{\subsetneqq}     {\mathrel}{mathdesignA}{"24}
    \MD@def\DeclareMathSymbol{\supsetneqq}     {\mathrel}{mathdesignA}{"25}
    \MD@def\DeclareMathSymbol{\varsubsetneqq}  {\mathrel}{mathdesignA}{"26}
    \MD@def\DeclareMathSymbol{\varsupsetneqq}  {\mathrel}{mathdesignA}{"27}
    \MD@def\DeclareMathSymbol{\subsetneq}      {\mathrel}{mathdesignA}{"28}
    \MD@def\DeclareMathSymbol{\supsetneq}      {\mathrel}{mathdesignA}{"29}
    \MD@def\DeclareMathSymbol{\nsubseteq}      {\mathrel}{mathdesignA}{"2A}
    \MD@def\DeclareMathSymbol{\nsupseteq}      {\mathrel}{mathdesignA}{"2B}
    \MD@def\DeclareMathSymbol{\nparallel}      {\mathrel}{mathdesignA}{"2C}
    \MD@def\DeclareMathSymbol{\nmid}           {\mathrel}{mathdesignA}{"2D}
    \MD@def\DeclareMathSymbol{\nshortmid}      {\mathrel}{mathdesignA}{"2E}
    \MD@def\DeclareMathSymbol{\nshortparallel} {\mathrel}{mathdesignA}{"2F}
    \MD@def\DeclareMathSymbol{\nvdash}         {\mathrel}{mathdesignA}{"30}
    \MD@def\DeclareMathSymbol{\nVdash}         {\mathrel}{mathdesignA}{"31}
    \MD@def\DeclareMathSymbol{\nvDash}         {\mathrel}{mathdesignA}{"32}
    \MD@def\DeclareMathSymbol{\nVDash}         {\mathrel}{mathdesignA}{"33}
    \MD@def\DeclareMathSymbol{\ntrianglerighteq}{\mathrel}{mathdesignA}{"34}
    \MD@def\DeclareMathSymbol{\ntrianglelefteq}{\mathrel}{mathdesignA}{"35}
    \MD@def\DeclareMathSymbol{\ntriangleleft}  {\mathrel}{mathdesignA}{"36}
    \MD@def\DeclareMathSymbol{\ntriangleright} {\mathrel}{mathdesignA}{"37}
    \MD@def\DeclareMathSymbol{\nleftarrow}     {\mathrel}{mathdesignA}{"38}
    \MD@def\DeclareMathSymbol{\nrightarrow}    {\mathrel}{mathdesignA}{"39}
    \MD@def\DeclareMathSymbol{\nLeftarrow}     {\mathrel}{mathdesignA}{"3A}
    \MD@def\DeclareMathSymbol{\nRightarrow}    {\mathrel}{mathdesignA}{"3B}
    \MD@def\DeclareMathSymbol{\nLeftrightarrow}{\mathrel}{mathdesignA}{"3C}
    \MD@def\DeclareMathSymbol{\nleftrightarrow}{\mathrel}{mathdesignA}{"3D}
    \MD@def\DeclareMathSymbol{\divideontimes}  {\mathbin}{mathdesignA}{"3E}
    \MD@def\DeclareMathSymbol{\varnothing}     {\mathord}{mathdesignA}{"3F}
    \MD@def\DeclareMathSymbol{\nexists}        {\mathord}{mathdesignA}{"40}
    \MD@def\DeclareMathSymbol{\Join}           {\mathbin}{mathdesignA}{"5C}
    \MD@def\DeclareMathSymbol{\udtimes}        {\mathbin}{mathdesignA}{"5D}
    \MD@def\DeclareMathSymbol{\utimes}         {\mathbin}{mathdesignA}{"5E}
    \MD@def\DeclareMathSymbol{\dtimes}         {\mathbin}{mathdesignA}{"5F}
    \MD@def\DeclareMathSymbol{\Finv}           {\mathord}{mathdesignA}{"60}
    \MD@def\DeclareMathSymbol{\Game}           {\mathord}{mathdesignA}{"61}
    \MD@def\DeclareMathSymbol{\mho}            {\mathord}{mathdesignA}{"66}
    \MD@def\DeclareMathSymbol{\eth}            {\mathord}{mathdesignA}{"67}
    \MD@def\DeclareMathSymbol{\eqsim}          {\mathrel}{mathdesignA}{"68}
    \MD@def\DeclareMathSymbol{\beth}           {\mathord}{mathdesignA}{"69}
    \MD@def\DeclareMathSymbol{\gimel}          {\mathord}{mathdesignA}{"6A}
    \MD@def\DeclareMathSymbol{\daleth}         {\mathord}{mathdesignA}{"6B}
    \MD@def\DeclareMathSymbol{\lessdot}        {\mathbin}{mathdesignA}{"6C}
    \MD@def\DeclareMathSymbol{\gtrdot}         {\mathbin}{mathdesignA}{"6D}
    \MD@def\DeclareMathSymbol{\ltimes}         {\mathbin}{mathdesignA}{"6E}
    \MD@def\DeclareMathSymbol{\rtimes}         {\mathbin}{mathdesignA}{"6F}
    \MD@def\DeclareMathSymbol{\shortmid}       {\mathrel}{mathdesignA}{"70}
    \MD@def\DeclareMathSymbol{\shortparallel}  {\mathrel}{mathdesignA}{"71}
    \MD@def\DeclareMathSymbol{\smallsetminus}  {\mathbin}{mathdesignA}{"72}
    \MD@def\DeclareMathSymbol{\thicksim}       {\mathrel}{mathdesignA}{"73}
    \MD@def\DeclareMathSymbol{\thickapprox}    {\mathrel}{mathdesignA}{"74}
    \MD@def\DeclareMathSymbol{\approxeq}       {\mathrel}{mathdesignA}{"75}
    \MD@def\DeclareMathSymbol{\succapprox}     {\mathrel}{mathdesignA}{"76}
    \MD@def\DeclareMathSymbol{\precapprox}     {\mathrel}{mathdesignA}{"77}
    \MD@def\DeclareMathSymbol{\curvearrowleft} {\mathrel}{mathdesignA}{"78}
    \MD@def\DeclareMathSymbol{\curvearrowright}{\mathrel}{mathdesignA}{"79}
    \MD@def\DeclareMathSymbol{\digammaup}      {\mathord}{mathdesignA}{"7A}
    \MD@def\DeclareMathSymbol{\varkappaup}     {\mathord}{mathdesignA}{"7B}
    \MD@def\DeclareMathSymbol{\digammait}      {\mathord}{mathdesignA}{"62}
    \MD@def\DeclareMathSymbol{\varkappait}     {\mathord}{mathdesignA}{"63}
    \if@MDgrupright
    \MD@def\DeclareMathSymbol{\digamma}      {\mathord}{mathdesignA}{"7A}
    \MD@def\DeclareMathSymbol{\varkappa}     {\mathord}{mathdesignA}{"7B}
    \else
    \MD@def\DeclareMathSymbol{\digamma}    {\mathord}{mathdesignA}{"62}
    \MD@def\DeclareMathSymbol{\varkappa}   {\mathord}{mathdesignA}{"63}
    \fi
    \MD@def\DeclareMathSymbol{\Bbbk}           {\mathord}{mathdesignA}{"7C}
    \xdef\hslash{\mathord{\mathchar"0\hexnumber@\symmathdesignA 7D h}}
    \xdef\hbar{\mathord{\mathchar"0\hexnumber@\symmathdesignA 7E h}}%\mkern-13.8mu%
    \MD@def\DeclareMathSymbol{\backepsilon}    {\mathrel}{mathdesignA}{"7F}

    \MD@def\DeclareMathSymbol{\boxdot}       {\mathbin}{mathdesignA}{"80}
    \MD@def\DeclareMathSymbol{\boxplus}      {\mathbin}{mathdesignA}{"81}
    \MD@def\DeclareMathSymbol{\boxtimes}     {\mathbin}{mathdesignA}{"82}
    \MD@def\DeclareMathSymbol{\square}       {\mathord}{mathdesignA}{"83}
    \MD@def\DeclareMathSymbol{\blacksquare}  {\mathord}{mathdesignA}{"84}
    \MD@def\DeclareMathSymbol{\centerdot}    {\mathbin}{mathdesignA}{"85}
    \MD@def\DeclareMathSymbol{\lozenge}      {\mathord}{mathdesignA}{"86}
    \MD@def\DeclareMathSymbol{\blacklozenge} {\mathord}{mathdesignA}{"87}
    \MD@def\DeclareMathSymbol{\circlearrowright}   {\mathrel}{mathdesignA}{"88}
    \MD@def\DeclareMathSymbol{\circlearrowleft}    {\mathrel}{mathdesignA}{"89}
%% In amsfonts.sty:
    \MD@def\DeclareMathSymbol{\rightleftharpoons}{\mathrel}{mathdesignA}{"8A}
    \MD@def\DeclareMathSymbol{\leftrightharpoons}  {\mathrel}{mathdesignA}{"8B}
    \MD@def\DeclareMathSymbol{\boxminus}     {\mathbin}{mathdesignA}{"8C}
    \MD@def\DeclareMathSymbol{\Vdash}        {\mathrel}{mathdesignA}{"8D}
    \MD@def\DeclareMathSymbol{\Vvdash}       {\mathrel}{mathdesignA}{"8E}
    \MD@def\DeclareMathSymbol{\vDash}        {\mathrel}{mathdesignA}{"8F}
    \MD@def\DeclareMathSymbol{\twoheadrightarrow}  {\mathrel}{mathdesignA}{"90}
    \MD@def\DeclareMathSymbol{\twoheadleftarrow}   {\mathrel}{mathdesignA}{"91}
    \MD@def\DeclareMathSymbol{\leftleftarrows}     {\mathrel}{mathdesignA}{"92}
    \MD@def\DeclareMathSymbol{\rightrightarrows}   {\mathrel}{mathdesignA}{"93}
    \MD@def\DeclareMathSymbol{\upuparrows}         {\mathrel}{mathdesignA}{"94}
    \MD@def\DeclareMathSymbol{\downdownarrows} {\mathrel}{mathdesignA}{"95}
    \MD@def\DeclareMathSymbol{\upharpoonright} {\mathrel}{mathdesignA}{"96}
    \global\let\restriction\upharpoonright
    \MD@def\DeclareMathSymbol{\downharpoonright}   {\mathrel}{mathdesignA}{"97}
    \MD@def\DeclareMathSymbol{\upharpoonleft}  {\mathrel}{mathdesignA}{"98}
    \MD@def\DeclareMathSymbol{\downharpoonleft}{\mathrel}{mathdesignA}{"99}
    \MD@def\DeclareMathSymbol{\rightarrowtail} {\mathrel}{mathdesignA}{"9A}
    \MD@def\DeclareMathSymbol{\leftarrowtail}  {\mathrel}{mathdesignA}{"9B}
    \MD@def\DeclareMathSymbol{\leftrightarrows}{\mathrel}{mathdesignA}{"9C}
    \MD@def\DeclareMathSymbol{\rightleftarrows}{\mathrel}{mathdesignA}{"9D}
    \MD@def\DeclareMathSymbol{\Lsh}            {\mathrel}{mathdesignA}{"9E}
    \MD@def\DeclareMathSymbol{\Rsh}            {\mathrel}{mathdesignA}{"9F}
    \MD@def\DeclareMathSymbol{\rightsquigarrow}  {\mathrel}{mathdesignA}{"A0}
    \MD@def\DeclareMathSymbol{\leftrightsquigarrow}{\mathrel}{mathdesignA}{"A1}
    \MD@def\DeclareMathSymbol{\looparrowleft}  {\mathrel}{mathdesignA}{"A2}
    \MD@def\DeclareMathSymbol{\looparrowright} {\mathrel}{mathdesignA}{"A3}
    \MD@def\DeclareMathSymbol{\circeq}       {\mathrel}{mathdesignA}{"A4}
    \MD@def\DeclareMathSymbol{\succsim}      {\mathrel}{mathdesignA}{"A5}
    \MD@def\DeclareMathSymbol{\gtrsim}       {\mathrel}{mathdesignA}{"A6}
    \MD@def\DeclareMathSymbol{\gtrapprox}    {\mathrel}{mathdesignA}{"A7}
    \MD@def\DeclareMathSymbol{\multimap}     {\mathrel}{mathdesignA}{"A8}
    \MD@def\DeclareMathSymbol{\therefore}    {\mathrel}{mathdesignA}{"A9}
    \MD@def\DeclareMathSymbol{\because}      {\mathrel}{mathdesignA}{"AA}
    \MD@def\DeclareMathSymbol{\doteqdot}     {\mathrel}{mathdesignA}{"AB}
    \global\let\Doteq\doteqdot
    \MD@def\DeclareMathSymbol{\triangleq}    {\mathrel}{mathdesignA}{"AC}
    \MD@def\DeclareMathSymbol{\precsim}      {\mathrel}{mathdesignA}{"AD}
    \MD@def\DeclareMathSymbol{\lesssim}      {\mathrel}{mathdesignA}{"AE}
    \MD@def\DeclareMathSymbol{\lessapprox}   {\mathrel}{mathdesignA}{"AF}
    \MD@def\DeclareMathSymbol{\eqslantless}  {\mathrel}{mathdesignA}{"B0}
    \MD@def\DeclareMathSymbol{\eqslantgtr}   {\mathrel}{mathdesignA}{"B1}
    \MD@def\DeclareMathSymbol{\curlyeqprec}  {\mathrel}{mathdesignA}{"B2}
    \MD@def\DeclareMathSymbol{\curlyeqsucc}  {\mathrel}{mathdesignA}{"B3}
    \MD@def\DeclareMathSymbol{\preccurlyeq}  {\mathrel}{mathdesignA}{"B4}
    \MD@def\DeclareMathSymbol{\leqq}         {\mathrel}{mathdesignA}{"B5}
    \MD@def\DeclareMathSymbol{\leqslant}     {\mathrel}{mathdesignA}{"B6}
    \MD@def\DeclareMathSymbol{\lessgtr}      {\mathrel}{mathdesignA}{"B7}
    \MD@def\DeclareMathSymbol{\backprime}    {\mathord}{mathdesignA}{"B8}
    \MD@def\DeclareMathSymbol{\risingdotseq} {\mathrel}{mathdesignA}{"BA}
    \MD@def\DeclareMathSymbol{\fallingdotseq}{\mathrel}{mathdesignA}{"BB}
    \MD@def\DeclareMathSymbol{\succcurlyeq}  {\mathrel}{mathdesignA}{"BC}
    \MD@def\DeclareMathSymbol{\geqq}         {\mathrel}{mathdesignA}{"BD}
    \MD@def\DeclareMathSymbol{\geqslant}     {\mathrel}{mathdesignA}{"BE}
    \MD@def\DeclareMathSymbol{\gtrless}      {\mathrel}{mathdesignA}{"BF}
    \MD@def\DeclareMathSymbol{\sqsubset}    {\mathrel}{mathdesignA}{"C0}
    \MD@def\DeclareMathSymbol{\sqsupset}    {\mathrel}{mathdesignA}{"C1}
    \MD@def\DeclareMathSymbol{\vartriangleright}{\mathrel}{mathdesignA}{"C2}
    \MD@def\DeclareMathSymbol{\vartriangleleft} {\mathrel}{mathdesignA}{"C3}
    \MD@def\DeclareMathSymbol{\trianglerighteq} {\mathrel}{mathdesignA}{"C4}
    \MD@def\DeclareMathSymbol{\trianglelefteq}  {\mathrel}{mathdesignA}{"C5}
    \MD@def\DeclareMathSymbol{\bigstar}    {\mathord}{mathdesignA}{"C6}
    \MD@def\DeclareMathSymbol{\between}    {\mathrel}{mathdesignA}{"C7}
    \MD@def\DeclareMathSymbol{\blacktriangledown}  {\mathord}{mathdesignA}{"C8}
    \MD@def\DeclareMathSymbol{\blacktriangleright} {\mathrel}{mathdesignA}{"C9}
    \MD@def\DeclareMathSymbol{\blacktriangleleft}  {\mathrel}{mathdesignA}{"CA}
    \MD@def\DeclareMathSymbol{\vartriangle}        {\mathrel}{mathdesignA}{"CD}
    \MD@def\DeclareMathSymbol{\blacktriangle}      {\mathord}{mathdesignA}{"CE}
    \MD@def\DeclareMathSymbol{\triangledown}       {\mathord}{mathdesignA}{"CF}
    \MD@def\DeclareMathSymbol{\eqcirc}       {\mathrel}{mathdesignA}{"D0}
    \MD@def\DeclareMathSymbol{\lesseqgtr}    {\mathrel}{mathdesignA}{"D1}
    \MD@def\DeclareMathSymbol{\gtreqless}    {\mathrel}{mathdesignA}{"D2}
    \MD@def\DeclareMathSymbol{\lesseqqgtr}   {\mathrel}{mathdesignA}{"D3}
    \MD@def\DeclareMathSymbol{\gtreqqless}   {\mathrel}{mathdesignA}{"D4}
    \MD@def\DeclareMathSymbol{\Rrightarrow}  {\mathrel}{mathdesignA}{"D6}
    \MD@def\DeclareMathSymbol{\Lleftarrow}   {\mathrel}{mathdesignA}{"D7}
    \MD@def\DeclareMathSymbol{\veebar}       {\mathbin}{mathdesignA}{"D9}
    \MD@def\DeclareMathSymbol{\barwedge}     {\mathbin}{mathdesignA}{"DA}
    \MD@def\DeclareMathSymbol{\doublebarwedge} {\mathbin}{mathdesignA}{"DB}
    \MD@def\DeclareMathSymbol{\angle}        {\mathord}{mathdesignA}{"DC}
    \MD@def\DeclareMathSymbol{\measuredangle}  {\mathord}{mathdesignA}{"DD}
    \MD@def\DeclareMathSymbol{\sphericalangle} {\mathord}{mathdesignA}{"DE}
    \MD@def\DeclareMathSymbol{\varpropto}    {\mathrel}{mathdesignA}{"DF}
    \MD@def\DeclareMathSymbol{\smallsmile}   {\mathrel}{mathdesignA}{"E0}
    \MD@def\DeclareMathSymbol{\smallfrown}   {\mathrel}{mathdesignA}{"E1}
    \MD@def\DeclareMathSymbol{\Subset}       {\mathrel}{mathdesignA}{"E2}
    \MD@def\DeclareMathSymbol{\Supset}       {\mathrel}{mathdesignA}{"E3}
    \MD@def\DeclareMathSymbol{\Cup}          {\mathbin}{mathdesignA}{"E4}
    \global\let\doublecup\Cup
    \MD@def\DeclareMathSymbol{\Cap}          {\mathbin}{mathdesignA}{"E5}
    \global\let\doublecap\Cap
    \MD@def\DeclareMathSymbol{\curlywedge}   {\mathbin}{mathdesignA}{"E6}
    \MD@def\DeclareMathSymbol{\curlyvee}     {\mathbin}{mathdesignA}{"E7}
    \MD@def\DeclareMathSymbol{\leftthreetimes} {\mathbin}{mathdesignA}{"E8}
    \MD@def\DeclareMathSymbol{\rightthreetimes}{\mathbin}{mathdesignA}{"E9}
    \MD@def\DeclareMathSymbol{\subseteqq}    {\mathrel}{mathdesignA}{"EA}
    \MD@def\DeclareMathSymbol{\supseteqq}    {\mathrel}{mathdesignA}{"EB}
    \MD@def\DeclareMathSymbol{\bumpeq}       {\mathrel}{mathdesignA}{"EC}
    \MD@def\DeclareMathSymbol{\Bumpeq}       {\mathrel}{mathdesignA}{"ED}
    \MD@def\DeclareMathSymbol{\lll}          {\mathrel}{mathdesignA}{"EE}
    \global\let\llless\lll
    \MD@def\DeclareMathSymbol{\ggg}          {\mathrel}{mathdesignA}{"EF}
    \global\let\gggtr\ggg
    \MD@def\DeclareMathSymbol{\pitchfork}    {\mathrel}{mathdesignA}{"F4}
    \MD@def\DeclareMathSymbol{\dotplus}      {\mathbin}{mathdesignA}{"F5}
    \MD@def\DeclareMathSymbol{\backsim}      {\mathrel}{mathdesignA}{"F6}
    \MD@def\DeclareMathSymbol{\backsimeq}    {\mathrel}{mathdesignA}{"F7}
    \MD@def\DeclareMathSymbol{\complement}   {\mathord}{mathdesignA}{"FB}
    \MD@def\DeclareMathSymbol{\intercal}     {\mathbin}{mathdesignA}{"FC}
    \MD@def\DeclareMathSymbol{\circledcirc}  {\mathbin}{mathdesignA}{"FD}
    \MD@def\DeclareMathSymbol{\circledast}   {\mathbin}{mathdesignA}{"FE}
    \MD@def\DeclareMathSymbol{\circleddash}  {\mathbin}{mathdesignA}{"FF}
    \global\let\lhd\vartriangleleft
    \global\let\unlhd\vartriangleleft
    \global\let\rhd\vartriangleright
    \global\let\unrhd\trianglerighteq
    \global\let\Box\square
    \global\let\Diamond\lozenge
    \global\let\leadsto\rightsquigarrow

%% -------------------------------------------------------------------
%% LaTeX Pictures fonts
%% -------------------------------------------------------------------

%% \font\tenln  =mdbchrline   \font\tenlnw  =mdbchbline \relax
%% \font\tencirc=mdbchrcirc   \font\tencircw=mdbchbcirc\relax
%% \let\@linefnt\tenln
%% \let\@circlefnt\tencirc

%% -------------------------------------------------------------------
%% Extra fonts
%% -------------------------------------------------------------------

\DeclareFontEncoding{MDB}{}{}
\DeclareFontSubstitution{MDB}{cmr}{m}{n}
\DeclareSymbolFont{mathdesignB}{MDB}{mdbch}{m}{n}%
\SetSymbolFont{mathdesignB}{bold}{MDB}{mdbch}{b}{n}%
\MD@def\DeclareMathSymbol{\smallin}{\mathrel}{mathdesignB}{0}
\MD@def\DeclareMathSymbol{\smallowns}{\mathrel}{mathdesignB}{1}
\MD@def\DeclareMathSymbol{\notsmallin}{\mathrel}{mathdesignB}{2}
\MD@def\DeclareMathSymbol{\notsmallowns}{\mathrel}{mathdesignB}{3}
\MD@def\DeclareMathSymbol{\rightangle}{\mathord}{mathdesignB}{4}
\MD@def\DeclareMathSymbol{\intclockwise}{\mathop}{mathdesignB}{128}
\MD@def\DeclareMathSymbol{\ointclockwise}{\mathop}{mathdesignB}{130}
\MD@def\DeclareMathSymbol{\ointctrclockwise}{\mathop}{mathdesignB}{132}
\MD@def\DeclareMathSymbol{\oiint}{\mathop}{mathdesignB}{134}
\MD@def\DeclareMathSymbol{\oiiint}{\mathop}{mathdesignB}{136}

%% -------------------------------------------------------------------
%% Various rule width
%% -------------------------------------------------------------------

\fboxrule = 0.540bp
\setlength\fboxsep{7\fboxrule}
\setlength\arrayrulewidth{0.540bp}

%% -------------------------------------------------------------------
%% mathdesign logo
%% -------------------------------------------------------------------

\xdef\mdlogo{\noexpand\mathhexbox{\hexnumber@\symmathdesignA}64}

%% -------------------------------------------------------------------
%% euro currency sign
%% -------------------------------------------------------------------

\if@MDeuro %
  \AtBeginDocument{%
        \xdef\euro{\noexpand\mathhexbox{\hexnumber@\symmathdesignA}65}
    }       
\fi

%% -------------------------------------------------------------------
%% Extra configurations
%% -------------------------------------------------------------------

%


\endinput
